﻿using System.Web;
using Sissonix.ExtRest.WADL;

namespace Sissonix.ExtRest.Processors
{
    public class MasterProcessor : IHttpHandler
    {
        /// <summary>
        /// Enables processing of HTTP Web requests by a custom HttpHandler that implements the <see cref="T:System.Web.IHttpHandler"/> interface.
        /// </summary>
        public void ProcessRequest(HttpContext context)
        {
            WADLContext ctx = new WADLContext();

            //ExtRestContext erc = new ExtRestContext();
            //try
            //{
            //    IExtRestProcessor erp = erc.GetRequestProcessor();
            //    erp.ProcessRequest(erc);
            //}
            //catch (RestException re)
            //{
            //    context.Response.Write(re.Message);
            //}
            return; 
        }

        /// <summary>
        /// Gets a value indicating whether another request can use the <see cref="T:System.Web.IHttpHandler"/> instance.
        /// </summary>
        /// <value></value>
        /// <returns>true if the <see cref="T:System.Web.IHttpHandler"/> instance is reusable; otherwise, false.
        /// </returns>
        public bool IsReusable
        {
            get { return true; }
        }
    }



}
